//
//  CompareTableViewCell.m
//  KeepFit
//
//  Created by dllo on 15/11/1.
//  Copyright © 2015年 Fuzzie Liu. All rights reserved.
//

#import "CompareTableViewCell.h"

@implementation CompareTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.compareImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.compareImageView];
        
        self.xLab = [[UILabel alloc] init];
        self.xLab.text = @"X";
        [self.contentView addSubview:self.xLab];
        
        self.amount1Lab = [[UILabel alloc] init];
        self.amount1Lab.font = [UIFont boldSystemFontOfSize:20];
        self.amount1Lab.textColor = [UIColor redColor];
        [self.contentView addSubview:self.amount1Lab];
        
        self.equalLab = [[UILabel alloc] init];
        self.equalLab.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:self.equalLab];
    }
    
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.compareImageView.frame = CGRectMake(10, 20, 60, 60);
    self.xLab.frame = CGRectMake(150, 30, 10, 10);
    self.amount1Lab.frame = CGRectMake(180, 25, 50, 20);
    self.equalLab.frame = CGRectMake(80, 50, self.contentView.frame.size.width- 80, 40);
    self.equalLab.numberOfLines = 0;
    [self.equalLab sizeToFit];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
